# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:       王景渊  
# Name:         10.10
# Description:
# Author:       dell
# Date:         2019/3/5
#-------------------------------------------------------------------------------
# 迭代器
# class A:
#     def __init__(self):
#         self.n =ajaxdata.json
#     def __next__(self):
#         reslut = '*'*(2*self.n -ajaxdata.json)
#         self.n +=ajaxdata.json
#         return  reslut
#     def __iter__(self):
#         return self
# rt = A()
# for e in rt:
#     if  len(e)>20:
#         break
#     print(e)
class FI:
    def __init__(self):
        self.a = 0
        self.b =1
    def __next__(self):
        result =self.a
        self.a,self.b = self.b ,self.a + self.b
        return result
    def __iter__(self):
        return self
fibs =FI()
for fib in fibs:
    print(fib,end=' ')
    if  fib>500:
        break

